<?php

namespace app\common\controller;

use think\Controller;
/**
 * 工具类
 */
class Tool extends Controller
{
    public function wanNengRelation($id){
        /**
         * key 强盛游戏包id
         * apiUrl str 研发角色转移接口地址
         * qudao_game_id str or int 对应渠道游戏id
         * qudao_api_url str 渠道验证接口地址
         * promote_id int 渠道id
         */
        $arr = array(
            1   => [
                'apiUrl'            => 'https://lv-login-460qntest.3975app.com/1000y/sj/gameRoleTransferQsRole',
                'qudao_game_id'     => "1855,1856,1864,1897",
                'qudao_api_url'     => 'https://sdk.youxin75.com/sdk/Tool/getChildLists',
                'promote_id'        => 173623,
                'channel_flag'      => 'wanneng',
                'channel_type'      => 1,
            ],
            6   => [
                'apiUrl'            => '',
                'qudao_game_id'     => 1855,
                'qudao_api_url'     => 'https://sdk.youxin75.com/sdk/Tool/getChildLists',
                'promote_id'        => 173623,
                'channel_flag'      => 'wanneng',
                'channel_type'      => 1,
            ],
            // 九妖神武
            15   => [
                'apiUrl'            => 'https://login-jyyqn.qn2024.com/1000y/sj/gameRoleTransferQsRole',
                'qudao_game_id'     => "",
                'qudao_api_url'     => 'https://login-jyyqn.qn2024.com/1000y/sj/channelAccountTransferredQs',
                'promote_id'        => 173623,
                'channel_flag'      => 'qnjyy',
                'channel_type'      => 0,
            ],
            // 九妖神武
            58   => [
                'apiUrl'            => 'https://login-jyyqn.qn2024.com/1000y/sj/gameRoleTransferQsRole',
                'qudao_game_id'     => "",
                'qudao_api_url'     => 'https://login-jyyqn.qn2024.com/1000y/sj/channelAccountTransferredQs',
                'promote_id'        => 173623,
                'channel_flag'      => 'qnjyy',
                'channel_type'      => 0,
            ],
            // 九妖神武
            57   => [
                'apiUrl'            => 'https://login-jyyqn.qn2024.com/1000y/sj/gameRoleTransferQsRole',
                'qudao_game_id'     => "",
                'qudao_api_url'     => 'https://login-jyyqn.qn2024.com/1000y/sj/channelAccountTransferredQs',
                'promote_id'        => 173623,
                'channel_flag'      => 'qnjyy',
                'channel_type'      => 0,
            ],
            // 云鹤千年
            111   => [
                'apiUrl'            => 'http://47.110.236.187:6088/qs_sdk/accountbind.do',
                'qudao_game_id'     => "",
                'qudao_api_url'     => 'http://47.110.236.187:6088/qs_sdk/accountverify.do',
                'promote_id'        => 173623,
                'channel_flag'      => '',
                'channel_type'      => 1,
            ],
            // 综合千年
            160   => [
                'apiUrl'            => 'http://pass.91qn.com/api/zy',
                'qudao_game_id'     => "",
                'qudao_api_url'     => 'http://pass.91qn.com/api/user',
                'promote_id'        => 173623,
                'channel_flag'      => 'jy',
                'channel_type'      => 0,
            ],
            // 综合千年
            159   => [
                'apiUrl'            => 'http://pass.91qn.com/api/zy',
                'qudao_game_id'     => "",
                'qudao_api_url'     => 'http://pass.91qn.com/api/user',
                'promote_id'        => 173623,
                'channel_flag'      => 'jy',
                'channel_type'      => 0,
            ],
            // 综合千年
            158   => [
                'apiUrl'            => 'http://pass.91qn.com/api/zy',
                'qudao_game_id'     => "",
                'qudao_api_url'     => 'http://pass.91qn.com/api/user',
                'promote_id'        => 173623,
                'channel_flag'      => 'jy',
                'channel_type'      => 0,
            ],
            // 梦千年
            124   => [
                'apiUrl'            => 'https://id.m1000y.com/api/zy/',
                'qudao_game_id'     => "",
                'qudao_api_url'     => 'https://id.m1000y.com/api/user/',
                'promote_id'        => 173623,
                'channel_flag'      => 'mqn_',
                'channel_type'      => 0,
            ],
        );
        return $arr[$id];
    }


    /**
     * 盒子侧的相关游戏转移
     * @param $id
     * @return array|false
     */
    public function wanNengRelationBox($id)
    {
        /**
         * key 盒子游戏cq_box_game的id, 会根据数据表中游戏的增加删减进行相应代码的更新
         * apiUrl str 研发角色转移接口地址
         * qudao_game_id str or int 对应渠道游戏id
         * qudao_api_url str 渠道验证接口地址
         * promote_id int 渠道id
         */
        $arr = array(
            1   => [
                'apiUrl'            => 'https://lv-login-460qntest.3975app.com/1000y/sj/gameRoleTransferQsRole',
                'qudao_game_id'     => "1855,1856,1864,1897",
                'qudao_api_url'     => 'https://sdk.youxin75.com/sdk/Tool/getChildLists',
                'promote_id'        => 173623,
                'channel_flag'      => 'wanneng',
            ],
            11   => [
                'apiUrl'            => 'https://login-zhqn-box.qn2024.com/1000y/sj/gameRoleTransferQsRole',
                'qudao_game_id'     => "2224,2225,2226",
                'qudao_api_url'     => 'https://sdk.youxin75.com/sdk/Tool/getChildLists',
                'promote_id'        => 173623,
                'channel_flag'      => 'wanneng',
            ],
            14   => [
                'apiUrl'            => 'https://login-jyyqn.qn2024.com/1000y/sj/gameRoleTransferQsRole',
                'qudao_game_id'     => "",
                'qudao_api_url'     => 'https://login-jyyqn.qn2024.com/1000y/sj/channelAccountTransferredQs',
                'promote_id'        => 173623,
                'channel_flag'      => 'qnjyy',
            ],
        );
        return isset($arr[$id]) ? $arr[$id] : false;
    }
}
